<template>
  <w-content-box
    :class-model="classModel"
    :options="searchOptions">
    <template v-slot="scope">
      <el-row :gutter="20">
        <el-col :span="8">
          <span class="log-text">{{ scope.item.defaultTag }}</span>
        </el-col>
        <el-col :span="8">
          <span class="log-text">{{ scope.item.userName }}</span>
        </el-col>
        <el-col :span="8">
          <span class="log-text">{{ scope.item.dateStr }}</span>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :span="8">
          <span class="log-text">{{ scope.item.routerPath }}</span>
        </el-col>
        <el-col :span="8">
          <span class="log-text">{{ scope.item.routerQuery }}</span>
        </el-col>
        <el-col :span="8">
          <span class="log-text">{{ scope.item.routerParams }}</span>
        </el-col>
      </el-row>
      <p
        class="log-text"
        v-if="scope.item.userAgent">{{ scope.item.userAgent }}</p>
    </template>
  </w-content-box>
</template>

<script>
  import WebProcessModel from '@/models/logs/LogWebProcessModel'
  import WContentBox from '../../com/contentBox'

  export default {
    name: "PCAdminLogsWebProcess",
    components: {
      WContentBox
    },
    data() {
      return {
        /**
         * 列表加载模型
         */
        classModel: WebProcessModel,
        searchOptions: [
          {
            title: '默认标识',
            key: 'defaultTag'
          }, {
            title: '用户名',
            key: 'userName'
          }, {
            title: '页面路由',
            key: 'routerPath'
          }, {
            title: '设备型号',
            key: 'userAgent'
          }
        ]
      }
    }
  }
</script>

<style lang="scss" scoped>
</style>
